<?php
/**
 ***** 扶摇而上、抱守本真 ******
 * @author Dana
 * @Date 2021/6/24
 */

class Model{

    protected static function validateArg($args){
        var_export($args);
        die('You need to override this in a subclass');
    }

    public static function find($args)
    {
        static::validateArg($args); // 会走 子类的 validateArg  这也叫 后期静态绑定
        //self::validateArg($args); // self 不遵循非静态方法所遵循的继承规则  会走 上面方法
        $class = get_called_class();
        echo $class.PHP_EOL;
        var_export(122222);
    }
}

class Bicycle extends Model{
    protected static function validateArg($args)
    {
        $class = get_called_class();
        echo $class.PHP_EOL;
        var_export(133333);
        var_export($args);
        return true;
    }
}

Bicycle::find(['owner'=>'peewee']);

